<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    .box{
      display: flex;
      width: 700px;
      height: 300px;
      border-left: 1px solid #000;
      border-bottom: 1px solid #000;
      margin: 50px auto;
      justify-content: space-around;
      align-items: flex-end;
      text-align: center;
    }
    .box>div{
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      background-color: pink;
      width: 50px;
    }
    .box div span{
      margin-top: -25px;
    }
    .box div h4{
      margin-bottom: -35px;
      width: 70px;
      margin-left: -10px;
    }
  </style>
</head>
<body>
  <div class="box">
    <div style="height: 123px;">
      <span>123</span>
      <h4>第一季度</h4>
    </div>
    <div style="height: 156px;">
      <span>156</span>
      <h4>第二季度</h4>
    </div>
    <div style="height: 120px;">
      <span>120</span>
      <h4>第三季度</h4>
    </div>
    <div style="height: 210px;">
      <span>210</span>
      <h4>第四季度</h4>
    </div>
  </div>
  <script>
    for(let i = 0; i < 4; i++){
     let num = prompt('请输入第' + (i + 1) + '季度的数据');
     let div = document.querySelector('.box').children[i];
     div.style.height = num + 'px';
     div.children[0].innerHTML = num;
     div.children[1].innerHTML = '第' + (i + 1) + '季度';
    }
  </script>
</body>
</html>